package com.yupi.springbootinit.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yupi.springbootinit.common.BaseResponse;
import com.yupi.springbootinit.common.ResultUtils;
import com.yupi.springbootinit.model.entity.NanChuan;
import com.yupi.springbootinit.service.NanChuanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: yangjianzhi
 * @version1.0
 */
@Slf4j
@RequestMapping("/nanchuan")
@RestController
public class NanChuanController {

    @Resource
    private NanChuanService nanChuanService;

    @GetMapping("/test")
    public BaseResponse<List<NanChuan>> test() {
        return ResultUtils.success(nanChuanService.list(new LambdaQueryWrapper<NanChuan>().eq(NanChuan::getGid, 12517)));
    }
}
